package homeword;

public class objectArray2 {
    private String brand;//品牌
    private double price;
    private String color;
    public objectArray2() {
    }

    public objectArray2(String brand, double price, String color) {
        this.brand = brand;
        this.price = price;
        this.color = color;
    }

    /**
     * 获取
     * @return brand
     */
    public String getBrand() {
        return brand;
    }

    /**
     * 设置
     * @param brand
     */
    public void setBrand(String brand) {
        this.brand = brand;
    }

    /**
     * 获取
     * @return price
     */
    public double getPrice() {
        return price;
    }

    /**
     * 设置
     * @param price
     */
    public void setPrice(double price) {
        this.price = price;
    }

    /**
     * 获取
     * @return color
     */
    public String getColor() {
        return color;
    }

    /**
     * 设置
     * @param color
     */
    public void setColor(String color) {
        this.color = color;
    }

   public void printArr(objectArray2 []arr){
       for (int i = 0; i < arr.length; i++) {
           System.out.println("品牌："+arr[i].brand+"价格："+arr[i].price+"颜色："+arr[i].color);
       }
   }
}
